#!/bin/bash +x
# Execute all unittests with coverage and report code coverage.
#
# Copyright: Red Hat Inc.
# License: GPLv2
# Author: Lukas Doktor <ldoktor@redhat.com>

coverage erase
rm .coverage.*
AVOCADO_CHECK_LEVEL=2 UNITTEST_AVOCADO_CMD="coverage run -p --include 'avocado/*' ./scripts/avocado" coverage run -p --include "avocado/*" ./selftests/run
coverage combine .coverage*
echo
coverage report -m --include "avocado/core/*"
echo
coverage report -m --include "avocado/utils/*"
